]> git.r.bdr.sh - rbdr/map/blobdiff - Map/Presentation/Base Components/MapRender/MapAxes.swift
Update contributing
[rbdr/map] / Map / Presentation / Base Components / MapRender / MapAxes.swift
index 6ba758f71675ac2dbe4403d8e0f82a102a8e5faa..bdbafbdaa87f681d213c29ccac79367fd150904f 100644 (file)
@@ -1,3 +1,19 @@
+/*
+ Copyright (C) 2024 Rubén Beltrán del Río
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see https://map.tranquil.systems.
+ */
 import SwiftUI
 
 struct MapAxes: View {
@@ -22,10 +38,14 @@ struct MapAxes: View {
       }.stroke(Color.map.axisColor, lineWidth: lineWidth * 2)
 
       // Y Labels
-      Text("Visible").font(.theme.axisLabel).foregroundColor(.map.labelColor).rotationEffect(Angle(degrees: -90.0))
-        .offset(CGSize(width: -35.0, height: 0.0))
-      Text("Invisible").font(.theme.axisLabel).foregroundColor(.map.labelColor).rotationEffect(Angle(degrees: -90.0))
-        .offset(CGSize(width: -40.0, height: mapSize.height - 20))
+      Text("Visible").font(.theme.axisLabel).foregroundColor(.map.labelColor).rotationEffect(
+        Angle(degrees: -90.0)
+      )
+      .offset(CGSize(width: -35.0, height: 0.0))
+      Text("Invisible").font(.theme.axisLabel).foregroundColor(.map.labelColor).rotationEffect(
+        Angle(degrees: -90.0)
+      )
+      .offset(CGSize(width: -40.0, height: mapSize.height - 20))
 
       // X Labels
 
@@ -71,11 +91,9 @@ struct MapAxes: View {
   }
 }
 
-struct MapAxes_Previews: PreviewProvider {
-  static var previews: some View {
-    MapAxes(
-      mapSize: CGSize(width: 200.0, height: 200.0), lineWidth: CGFloat(1.0),
-      evolution: Stage.stages(.general), stages: [25.0, 50.0, 75.0]
-    ).padding(50.0)
-  }
+#Preview {
+  MapAxes(
+    mapSize: CGSize(width: 200.0, height: 200.0), lineWidth: CGFloat(1.0),
+    evolution: Stage.stages(.general), stages: [25.0, 50.0, 75.0]
+  ).padding(50.0)
 }